package conchmusic.conchmusicclient.thread;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import conchmusic.conchmusicclient.util.Invoker;

/**
 * Created by Administrator on 2017/5/10.
 */

public class QueryThread implements Runnable {
    private Handler handler;
    private Invoker invoker;
    private boolean flag;

    public QueryThread(Invoker invoker, Handler handler) {
        this.invoker = invoker;
        this.handler = handler;
    }

    @Override
    public void run() {
        String json = invoker.action();
        Message message = new Message();
        Bundle bundle = new Bundle();
        bundle.putString("json", json);
        message.setData(bundle);
        handler.sendMessage(message);
    }

}
